package com.jshoperxms.controller.utils.enums;



/**
 * 货物枚举
* @ClassName: ProductEnums 
* @Description: TODO(这里用一句话描述这个类的作用) 
* @author jcchen
* @date 2015年10月9日 下午2:38:33 
*
 */
public class ProductEnums {

	/**
	 * 
	 * 货物单位
	 * @ClassName: ProductUnit
	 * @Description: TODO(这里用一句话描述这个类的作用)
	 * @author jcchen
	 * @date 2015年2月17日 下午11:10:28
	 *
	 */
	public enum ProductUnit {
		JIAN("件", "1"), ZHANG("张", "2"),TAO("套","3"),GE("个","4")
		,ZU("组","5"),XILIE("系列","6");
		private String name;
		private String state;

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getState() {
			return state;
		}

		public void setState(String state) {
			this.state = state;
		}

		private ProductUnit(String name, String state) {
			this.name = name;
			this.state = state;
		}

		public static String getName(String state) {
			for (ProductUnit orderstate : ProductUnit.values()) {
				if (orderstate.getState().equals(state)) {
					return orderstate.getName();
				}
			}
			return "";
		}
	}
	
	/**
	 * 货物是否默认首选
	 * @author sdywcd
	 *
	 */
	public enum ProductIsDefault {
		NOT_DEFAULT("非首选", "0"), DEFAULT("首选", "1");
		private String name;
		private String state;

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getState() {
			return state;
		}

		public void setState(String state) {
			this.state = state;
		}

		private ProductIsDefault(String name, String state) {
			this.name = name;
			this.state = state;
		}

		public static String getName(String state) {
			for (ProductIsDefault orderstate : ProductIsDefault.values()) {
				if (orderstate.getState().equals(state)) {
					return orderstate.getName();
				}
			}
			return "";
		}
	}
	/**
	 * 
	 *  重量单位
	 * @ClassName: ProductWeightUnit
	 * @Description: TODO(这里用一句话描述这个类的作用)
	 * @author jcchen
	 * @date 2015年2月17日 下午11:10:28
	 *
	 */
	public enum ProductWeightUnit {
		KG("千克","1"),G("克","2");
		private String name;
		private String state;

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getState() {
			return state;
		}

		public void setState(String state) {
			this.state = state;
		}

		private ProductWeightUnit(String name, String state) {
			this.name = name;
			this.state = state;
		}

		public static String getName(String state) {
			for (ProductWeightUnit orderstate : ProductWeightUnit.values()) {
				if (orderstate.getState().equals(state)) {
					return orderstate.getName();
				}
			}
			return "";
		}
	}
	
	
	/**
	 * 
	 *  SKU类型
	 * @ClassName: ProductSkuType
	 * @Description: TODO(这里用一句话描述这个类的作用)
	 * @author jcchen
	 * @date 2015年2月17日 下午11:10:28
	 *
	 */
	public enum ProductSkuType {
		TEXT("SKU文字","1"),COLOR("SKU颜色","2");
		private String name;
		private String state;

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getState() {
			return state;
		}

		public void setState(String state) {
			this.state = state;
		}

		private ProductSkuType(String name, String state) {
			this.name = name;
			this.state = state;
		}

		public static String getName(String state) {
			for (ProductSkuType orderstate : ProductSkuType.values()) {
				if (orderstate.getState().equals(state)) {
					return orderstate.getName();
				}
			}
			return "";
		}
	}
	
	/**
	 * 
	 *  SKU共享
	 * @ClassName: ProductSkuIsShare
	 * @Description: TODO(这里用一句话描述这个类的作用)
	 * @author jcchen
	 * @date 2015年2月17日 下午11:10:28
	 *
	 */
	public enum ProductSkuIsShare {
		SHARE("共享","1"),UNSHARE("不共享","0");
		private String name;
		private String state;

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getState() {
			return state;
		}

		public void setState(String state) {
			this.state = state;
		}

		private ProductSkuIsShare(String name, String state) {
			this.name = name;
			this.state = state;
		}

		public static String getName(String state) {
			for (ProductSkuIsShare orderstate : ProductSkuIsShare.values()) {
				if (orderstate.getState().equals(state)) {
					return orderstate.getName();
				}
			}
			return "";
		}
	}
	
	
}
